<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head th:include="include :: header"></head>
<style>
html{background:#fff;}
body{padding:0 0 5px 0!important;}
body>form>ul{background:#fff;}
</style>
<link rel="stylesheet"    th:href="@{/lib/ztree/css/zTreeStyle/zTreeStyle.css}" type="text/css" media="all">
<body>
<form class="layui-form layui-form-pane" action="" id="saveForm">
    <ul id="ztree" class="ztree"></ul>
    <input type="hidden" id="ids" name="ids" th:value="${ids}"/>
    <input type="hidden" id="deptId" name="deptId" />
   <div class="layui-form-item" style="display:none;">
    <button class="layui-btn" lay-submit="" lay-filter="saveSubmit">提交</button>
  </div>
</form>

  <div th:include="include :: footer"></div>
<script type="text/javascript" th:src="@{/lib/ztree/js/jquery.ztree.core.js}"></script>
	<script type="text/javascript" th:src="@{/lib/ztree/js/jquery.ztree.excheck.js}"></script>
	<script type="text/javascript" th:src="@{/lib/ztree/js/jquery.ztree.exedit.js}"></script>
	<script>

	layui.config({
		base :  cxt+'layuiadmin/' //静态资源所在路径
	}).extend({
		webplus : 'lib/webplus' //主入口模块
	}).use([ 'table', 'form','webplus' ], function() {
		var $ = layui.$, 
		form = layui.form, 
		webplus=layui.webplus;
		var setting = {
			check: {
				enable: false
			},
			data: {
				simpleData: {
					enable: true
				}
			},
			callback: {
				onClick: zTreeOnClick//节点点击事件
			}
		};
		function zTreeOnClick(event, treeId, treeNode) {
			var confirmMsg="你确认把选择的用户移动到当前组织机构["+treeNode.name+"]下面吗？";
			var params={};
			params.ids=$("#ids").val();
			params.deptId=treeNode.id;
			webplus.doAjax('system/user/saveMoveUser',params,confirmMsg,'','1');
		};
		
		webplus.initTree("system/dept/loadDeptTree",setting)
		
	});
	</script>

<link rel="stylesheet"    th:href="@{/css/common/openshow.css}" media="all"/>

</body>
</html>